<script lang="ts" setup>
import starUtil from "./starUtil.vue";
const props = defineProps({
  comment:{
    type: Object
  }
});
</script>
<template>
  <section class="commentTextUtil">
    <div class="title">
      <div class="l-wrap">
        <span class="name">{{props.comment.buyerName}}</span>
        <starUtil :num="props.comment.commentGrade"></starUtil>
      </div>
      <time>{{props.comment.createTime}}</time>
    </div>
    <div class="desc">{{props.comment.commentText}}</div>
    <!-- <div class="product">评论的商品：六千年前女儿红美酒</div> -->
  </section>
</template>

<style lang="less" scoped>
.commentTextUtil {
  width: 3.55rem;
  padding: .1rem 0;
  position: relative;
  margin: 0 auto;
  font-size: 12px;
  &::after {
    width: 100%;
    height: 0;
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    border-top: .01rem solid #ddd;
  }
  .title {
    height: .2rem;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .l-wrap {
      display: flex;
      align-items: center;
      .name {
        padding-right: .04rem;
      }
    }
  }
  .desc{
    padding: .02rem 0;
    line-height: 1.3
  }
  .product {
    height: .3rem;
    line-height: .3rem;
    color: #999;
  }
}
</style>
